package top.ffhome.concurrency.example.immutable;

import cn.hutool.core.map.MapUtil;
import lombok.extern.slf4j.Slf4j;
import top.ffhome.common.annotation.NotThreadSafe;

import java.util.Map;

@Slf4j
@NotThreadSafe
public class ImmutableExample1 {
    private final static Integer a = 1;
    private final static String b = "2";
    private static Map<Integer, Integer> map = MapUtil.newHashMap();

    static {
        map.put(1, 2);
        map.put(3, 4);
        map.put(5, 6);
    }

    public static void main(String[] args) {
//        a = 2;
//        b = "3";
//        map = MapUtil.newHashMap();
        map.put(1, 3);
        log.info("{}", map);
    }
}
